//
//  YWEquipmentMaintenanceRecord.h
//  maintain
//
//  Created by 郑想 on 15/11/11.
//  Copyright © 2015年 ewin. All rights reserved.
//

#import <Foundation/Foundation.h>

@class YWHandler;
@class YWShortEquipment;

typedef NS_ENUM(NSUInteger, YWEquipmentMaintenanceRecordUploadStatus) {
    YWEquipmentMaintenanceRecordUploadStatusNull = 0,
    YWEquipmentMaintenanceRecordUploadStatusUploading = 1,
    YWEquipmentMaintenanceRecordUploadStatusFinished = 2, //上传
    YWEquipmentMaintenanceRecordUploadStatusUnFinished = 3 //未上传
};

typedef NS_ENUM(NSUInteger, YWEquipmentMaintenanceRecordStatus) {
    YWEquipmentMaintenanceRecordStatusNormal = 1, //正常
    YWEquipmentMaintenanceRecordStatusTrouble = 2, //故障
};

@interface YWEquipmentMaintenanceRecord : NSObject
/**唯一标识(临时任务用)*/
@property (nonatomic,copy)NSString* uniqueTag;
/**结果序号*/
@property (nonatomic,copy)NSString* recordSequence;
/**记录ID*/
@property (nonatomic, assign) NSInteger recordId;
/**任务ID*/
@property (nonatomic, assign) NSInteger missionId;
/**设备ID*/
@property (nonatomic, copy) NSString* equipmentId;
/**设备对象(id和name，用于解析)*/
@property (nonatomic, strong) YWShortEquipment *equipment;
/**记录备注*/
@property (nonatomic, copy) NSString* note;
/**扫描时间*/
@property (nonatomic, assign) NSTimeInterval clientScanTime;
/**完成时间*/
@property (nonatomic, assign) NSTimeInterval completeTime;
/**处理人姓名*/
@property (nonatomic, copy) NSString* handlerName;
/**处理人*/
@property (nonatomic, strong) YWHandler* handler;
/**上传状态*/
@property (nonatomic, assign) NSInteger uploadStatus;
/**状态*/
@property (nonatomic, assign) YWEquipmentMaintenanceRecordStatus status;
/**维保类型*/
@property (nonatomic, assign) NSInteger maintenanceTypeId;
/**维保周期*/
@property (nonatomic, assign) NSInteger missionCycle;
/**日月用于显示*/
@property (nonatomic, copy) NSString* dayMonthString;
/**记录图片*/
@property (nonatomic, strong) NSArray* recordPictures;
/**自定义属性数组（现用于提交记录时用）*/
@property (nonatomic, strong) NSArray* equipmentFieldRecord;
@end

@interface YWEquipmentMaintenanceRecordJson : NSObject
/**唯一标识(临时任务用)*/
@property (nonatomic,copy)NSString* uniqueTag;
/**结果序号*/
@property (nonatomic,copy)NSString* recordSequence;
/**记录ID*/
@property (nonatomic, assign) NSInteger recordId;
/**任务ID*/
@property (nonatomic, assign) NSInteger missionId;
/**设备Id*/
@property (nonatomic, copy) NSString* equipmentId;
/**设备Id*/
@property (nonatomic, strong) YWShortEquipment* equipment;
/**维保类型Id*/
@property (nonatomic, assign) NSInteger maintenanceTypeId;
/**维保周期*/
@property (nonatomic, assign) NSInteger missionCycle;
/**记录备注*/
@property (nonatomic, copy) NSString* note;
/**状态 正常 故障*/
@property (nonatomic, assign) YWEquipmentMaintenanceRecordStatus statusTypeId;
/**处理人信息*/
@property (nonatomic, strong) YWHandler* handler;
/**图片记录*/
@property (nonatomic, strong) NSArray* pictures;
/**日月用于显示*/
@property (nonatomic, copy) NSString* dayMonthString;
/**完成时间*/
@property (nonatomic, assign) NSTimeInterval maintenanceTime;
/**自定义属性*/
@property (nonatomic, strong) NSArray *equipmentFields;
@end
